﻿Imports System.Drawing

Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports Battleship



'''<summary>
'''This is a test class for BattleshipGridSquareTest and is intended
'''to contain all BattleshipGridSquareTest Unit Tests
'''</summary>
<TestClass()> _
Public Class BattleshipGridSquareTest


    Private testContextInstance As TestContext

    '''<summary>
    '''Gets or sets the test context which provides
    '''information about and functionality for the current test run.
    '''</summary>
    Public Property TestContext() As TestContext
        Get
            Return testContextInstance
        End Get
        Set(value As TestContext)
            testContextInstance = Value
        End Set
    End Property

#Region "Additional test attributes"
    '
    'You can use the following additional attributes as you write your tests:
    '
    'Use ClassInitialize to run code before running the first test in the class
    '<ClassInitialize()>  _
    'Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
    'End Sub
    '
    'Use ClassCleanup to run code after all tests in a class have run
    '<ClassCleanup()>  _
    'Public Shared Sub MyClassCleanup()
    'End Sub
    '
    'Use TestInitialize to run code before running each test
    '<TestInitialize()>  _
    'Public Sub MyTestInitialize()
    'End Sub
    '
    'Use TestCleanup to run code after each test has run
    '<TestCleanup()>  _
    'Public Sub MyTestCleanup()
    'End Sub
    '
#End Region


    '''<summary>
    '''A test for ShipExists
    '''</summary>
    <TestMethod()> _
    Public Sub ShipExistsTest()
        Dim target As BattleshipGridSquare = New BattleshipGridSquare()
        Dim expected As Boolean = True
        Dim actual As Boolean
        target.ShipExists = expected
        actual = target.ShipExists
        Assert.AreEqual(expected, actual)
    End Sub

    '''<summary>
    '''A test for ShipName
    '''</summary>
    <TestMethod()> _
    Public Sub ShipNameTest()
        Dim target As BattleshipGridSquare = New BattleshipGridSquare()
        Dim expected As String = "Destroyer"
        Dim actual As String
        target.ShipName = expected
        actual = target.ShipName
        Assert.AreEqual(expected, actual)
    End Sub

    '''<summary>
    '''A test for ShipSprite
    '''</summary>
    <TestMethod()> _
    Public Sub ShipSpriteTest()
        Dim target As BattleshipGridSquare = New BattleshipGridSquare()
        Dim expected As Image = Nothing
        Dim actual As Image
        target.ShipSprite = expected
        actual = target.ShipSprite
        Assert.AreEqual(expected, actual)
    End Sub

    '''<summary>
    '''A test for ShotState
    '''</summary>
    <TestMethod()> _
    Public Sub ShotStateTest()
        Dim target As BattleshipGridSquare = New BattleshipGridSquare()
        Dim expected As Integer = 2
        Dim actual As Integer
        target.ShotState = expected
        actual = target.ShotState
        Assert.AreEqual(expected, actual)
    End Sub
End Class
